home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 15881 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  2.6 KB

  1. Path: news.sprintlink.net!datalytics!usenet
  2. From: Rob Stewart <stew@datalytics.com>
  3. Newsgroups: comp.lang.c++,rec.games.programmer,alt.msdos.programmer,comp.programming
  4. Subject: Re: Young programmers read me.
  5. Date: Mon, 08 Apr 1996 14:06:31 -0400
  6. Organization: Datalytics, Inc
  7. Message-ID: <316955A7.63F9@datalytics.com>
  8. References: <4icpp9$7hr@barad-dur.nas.com> <4imqe4$cj3@ping1.ping.be> <1996Mar23.224853.116513@kuhub.cc.ukans.edu> <4j52hn$ikb@news.ios.com> <Pine.OSF.3.91.960403112207.17337H-100000@bud.cc.swin.edu.au> <aidan-0404961557290001@meathook.intac.com> <pnoguchi-0404962135210001@pnoguchi.his.com> <aidan-0604961847480001@meathook.intac.com> <4k93rk$9lq@nw002.infi.net>
  9. NNTP-Posting-Host: 204.62.224.71
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. Content-Transfer-Encoding: 7bit
  13. X-Mailer: Mozilla 2.0 (WinNT; I)
  14.  
  15. KlawS wrote:
  16. > aidan@genghis.kublai.com (Aidan Cully) wrote:
  17. > >Here you point out one of my greatest objections to the language as though
  18. > >it were a feature...  I agree that a programmer should be able to find his
  19. > >own bugs, but loose syntax is just pointless, and makes the bug-hunt just
  20. > >so much harder.  I don't think that anyone should have the right to feel
  21. > >macho about being able to figure out how to program in one language while
  22. > >others can't unless the language has some spiffy new layer of abstraction
  23. > >or something that people can't deal with (e.g. OOP), but otherwise it
  24. > >seems like the language is badly designed.  After gaining a mastery of
  25. > >C++, then learning other OOP languages, I have come to the conclusion that
  26. > >C++ is badly designed.  For example, Function pointer will return an
  27. > >integer, takes two ints as parameters.  In C/C++
  28. > >   typedef (int*)(int a, int b) MyFuncType;
  29. > >   MyFuncType MyFunc;
  30. > >in Oberon
  31. > >   TYPE
  32. > >      MyFuncType:FUNCTION( a, b:INTEGER ):INTEGER;
  33. > >   VAR
  34. > >      MyFunc:MyFuncType;
  35. > >Which do you think looks more readable?
  36. > To me, the former does. *shrug* I guess that's what happens when you
  37. > skip pascal in the "learning trend"... (It's already a rather
  38. > ambiguous command, in either language)
  39.  
  40. The former is also more readable to me, since there is less text 
  41. to process to get the information.  What I read from it though, 
  42. is an error.  Perhaps Aidan meant this:
  43.  
  44. typedef int (*MyFuncType)(int a, int b);
  45.  
  46. As I look at the Oberon version, I'm left wondering about the 
  47. type of a.  Why isn't it declared a:INTEGER?  I suspect, 
  48. however, it may be easier to write the Oberon version correctly 
  49. the first time.
  50.  
  51. -- 
  52. Robert Stewart        | My opinions are usually my own.
  53. Datalytics, Inc.    | stew@datalytics.com
  54.